package com.ganbo.ms.mongodb.controller;


import com.ganbo.ms.mongodb.entity.Comment;
import com.ganbo.ms.mongodb.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CommentController {

    @Autowired
    CommentService commentService;

    @GetMapping("/list")
    public List<Comment> list() {
        return commentService.findCommentList();
    }

}

